package cn.chendd.users.service.impl;

import cn.chendd.users.mapper.UsersMapper;
import cn.chendd.users.model.Users;
import cn.chendd.users.service.UsersService;
import io.seata.core.context.RootContext;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;

/**
 * 用户管理Service接口实现
 *
 * @author chendd
 * @date 2023/1/23 21:21
 */
@Service
public class UsersServiceImpl implements UsersService {

    @Resource
    private UsersMapper usersMapper;

    @Override
    public void saveData() {
        System.out.println("TX_XID--->" + RootContext.getXID());
        Users users = new Users(null , "chendd" , "男" , "88911006@qq.com" , LocalDateTime.now().toString());
        this.usersMapper.insert(users);
    }
}
